﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MaterPage.Master" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="WebApplication.Index" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <form id="form1" runat="server">
        <asp:ListView ID="ListView1" runat="server"
            GroupItemCount="3"
                DataKeyNames="MaSP" OnSelectedIndexChanged="ListView1_SelectedIndexChanged">
                <LayoutTemplate>
                    <table runat="server" id="tblProducts">
                        <tr runat="server" id="groupPlaceholder"></tr>
                    </table>
                    <div style="line-height:30px; margin:0 auto; text-align:right; color:red">
                    <asp:DataPager runat="server" ID="DataPager" PageSize="9">
                    <Fields>
                        <asp:NextPreviousPagerField 
                            ButtonType="Link" 
                            RenderNonBreakingSpacesBetweenControls="true"
                            FirstPageText="Trang đầu" 
                            PreviousPageText="Quay lại" 
                            ShowFirstPageButton="true" 
                            ShowPreviousPageButton="true"
                            ShowNextPageButton="false"
                        />
                        <asp:NumericPagerField  ButtonType="Link" />
                        <asp:NextPreviousPagerField 
                            ButtonType="Link" 
                            RenderNonBreakingSpacesBetweenControls="true"
                            LastPageText ="Trang cuối" 
                            NextPageText="Tiếp theo"
                            ShowLastPageButton="true"
                            ShowNextPageButton="true"
                            ShowPreviousPageButton="false"
                        />
                    </Fields>
                    </asp:DataPager>
                    </div>
              </LayoutTemplate>
              <GroupTemplate>
                <tr runat="server" id="productRow">
                  <td runat="server" id="itemPlaceholder"></td>
                </tr>
              </GroupTemplate>
              <ItemTemplate>
                <td id="Td1" runat="server" style="border:solid #4cff00 1px">
                    <ul style="list-style-type:none">
                        <li style="width:133px; line-height:20px; color:darkblue; text-align:center">
                            <asp:Label ID="lblMaSP" runat="server" Text='<%# Eval("TenSP") %>'></asp:Label>
                        </li>
                        <li style="width:133px; display:block; padding:25px 0;height:auto">
                            <div style="width:133px; margin:0 auto">
                                <a href="ChiTietSanPham.aspx?id=<%# Eval("MaSP") %>"><asp:Image ID="Image1" ImageUrl='<%# Eval("Anh") %>' Width="83" Height="83" runat="server" /></a>
                            </div>
                        </li>
                        <li style="width:133px; line-height:20px; color:red; text-align:center; font-size:12px">
                            <asp:Label ID="lblGia" runat="server" Text='<%# "Giá " + String.Format("{0:0,0;(#,##0.00);Nothing}",Eval("Gia")) + " đồng"%>'></asp:Label>
                        </li>
                        <li style="width:133px; line-height:30px; background-color:orange;">
                            <div style="width:80px; margin:0 auto">
                                <asp:Button ID="Button2" runat="server" Text="Xem chi tiết"/>
                            </div>
                        </li>
                    </ul>
                </td>
              </ItemTemplate>
      



        </asp:ListView>
    </form>

    </asp:Content>
